<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>留言</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<style type="text/css">
*{
	width:100%;
	vertical-align: middle;
	text-align: center;
	font-size: 12px; 		
}
body{
	height: 100%;
	background-color: #fcc;
}
.message{
	height:95%;
	width: 97%;
}
.message h2{
	padding: 10px 0px;
	color: #3ef;
	font-size: 24px;
	font-weight: normal;
	margin: 0px;
}
.message textarea{
	text-align: left;
	height: 75%;
	width: 99%;
	overflow: hidden;
	float: left;
	resize: none;
	margin-bottom: 15px;
	font-size: 14px;
	color: #9e9;
}
.message span{
	padding: 3px 15px;
	display:inline-block;
	width:auto;
	font-size: 14px;
	border: 1px #999 solid;
	border-radius:5px;
}
.message span:hover{
	cursor: pointer;
	color: #def;
}
</style>
<script type="text/javascript">
function saveMessage(){
	var contents = document.getElementById("contents").value;
	var messageIframe = parent.document.getElementById("messageIframe");
	var userId = messageIframe.userId;
	var myajax = getByAjax();
	myajax.init(null,"get",true);
	myajax.get("/networkforum/message/add_message.do?userId="+userId+"&contents="+encodeURIComponent(contents),cancle);
	myajax = null;
}
function cancle(){
	var parent = window.parent;
	var messageIframe = parent.document.getElementById("messageIframe");
	var back = parent.document.getElementById("back");
	parent.document.body.removeChild(messageIframe);
	parent.document.body.removeChild(back);
}
</script>
</head>

<body>
	<input type="text" style="display:none;" id="userId">
	<div id="message" class="message">
		<h2>留言板</h2>
		<textarea id="contents" rows="" cols="" wrap="physical"></textarea>
		<span onclick="saveMessage();">确定</span>
		<span onclick="cancle();">取消</span>
	</div>
</body>
<script type="text/javascript" src="/networkforum/js/myajax.js"></script>
</html>
